 function Timecalculation(time){
                time=new Date(Date.parse(time.replace(/-/g,  "/")));//获取传入时间 并将其转化为date型
                var nowTime=new Date();//获取当前时间
                console.log(nowTime.getTime(),time.getTime());
                var timeDifference=-(nowTime.getTime()-time.getTime());//时间差的毫秒数
                console.log(timeDifference);
                if(timeDifference<0){
                return '超过规定处理时间';
                }else{
                    var days=Math.floor(timeDifference/(24*3600*1000));//计算出相差天数
                    var leave1=timeDifference%(24*3600*1000); //计算天数后剩余的毫秒数
                    var hours=Math.floor(leave1/(3600*1000)); //计算出小时数
                    var leave2=leave1%(3600*1000); //计算小时数后剩余的毫秒数
                    var minutes=Math.floor(leave2/(60*1000));//计算相差分钟数
                    var leave3=leave2%(60*1000); //计算分钟数后剩余的毫秒数
                    var seconds=Math.round(leave3/1000); //计算相差秒数
                    // return days+'天'+hours+'小时'+minutes+'分钟'+seconds+'秒';
                    return {
						timeDifference,
                        leave1,
                        days,
                        hours,
                        minutes,
                        seconds
                    }
                }
        }
export default Timecalculation;
		
